package com.globallogic.jira.gadget.composite;

import java.util.ArrayList;
import java.util.List;

import com.atlassian.jira.issue.Issue;

/**
 * @author anton.pereverziev
 * @author yegor.chumakov
 * 
 *         An n-ary tree structure
 */
public class ReportNode {

    private final Issue issue;
    private final List<ReportNode> children = new ArrayList<ReportNode>();

    public ReportNode(Issue issue) {
	this.issue = issue;
    }

    public List<ReportNode> getChild() {
	return children;
    }

    public Issue getIssue() {
	return issue;
    }

    public void addNode(ReportNode node) {
	children.add(node);

    }

    public List<ReportNode> getChildren() {
	return children;
    }

}
